/*
 * @Author: 橘子
 * @Date: 2022-11-26 15:55:15
 * @Project_description: 文档
 * @Description: 代码是我抄的，不会也是真的
 */
import { flatten } from 'lodash'
import setting from '@/setting'

let doc = []
if (setting.search.enable) {
  const files = require.context('./module', true, /\.doc\.js$/)
  let generators = files.keys().map((key) => files(key).default)
  doc = flatten(generators)
}
export default doc
